package com.i7jike.com.i7jike;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.widget.Button;

import com.avos.avoscloud.AVAnalytics;
import com.avos.avoscloud.AVOSCloud;
import com.avos.avoscloud.AVObject;

public class MainActivity extends Activity {

    Button _loginBtn;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        //If you are using US node, please add this line AVOSCloud.useAVCloudUS();
        AVOSCloud.initialize(this, "rw80fuksqxmuy0e1ypso0o8c2y4v7x8oreucr88x61ke3niy", "re0ilofz0w22e8mktjnhoph6p6yx8tngetd4nplbby1gwzs2");
        //For tracking your app
        AVAnalytics.trackAppOpened(getIntent());
        //Test Object
//        AVObject testObject = new AVObject("TestObject");
//        testObject.put("foo", "bar");
//        testObject.saveInBackground();
        _loginBtn = ( Button ) findViewById(R.id.btn_login);
        _loginBtn.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                //This is a comment which does no good to your code. Feel free to remove it after you copy paste.
                //When the button is clicked, the control will come to this method.
                //To demonstrate this, let us try changing the label of the Button from 'Login' to 'I am clicked'

               // _loginBtn.setText("I am Clicked");
                Intent intent = new Intent(MainActivity.this, ProjectListActivity.class);
                startActivity(intent);
            }

        });

    }


}
